﻿{include file="public/header" /}
<body>
<article class="page-container">
    <form action="" method="post" class="form form-horizontal" id="form-admin-role-add">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>角色名称：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$role->role_name}" placeholder="" id="roleName"
                       name="roleName">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">分配权限：</label>
            <div class="formControls col-xs-8 col-sm-9">
                {volist name='$permission_A' id='vo'}
                <dl class="permission-list">
                    <dt>
                        <label>
                            <input type="checkbox" {in name="vo->ps_id" value="$arr" }checked="checked" {/in}
                            value="{$vo->ps_id}" name="role[]" id="user-Character-0">
                            {$vo->ps_name}
                        </label>
                    </dt>
                    <dd>
                        {volist name='$permission_B' id='voo'}
                        {eq name='vo->ps_id' value="$voo->ps_pid"}
                        <dl class="cl permission-list2">
                            <dt>
                                <label class="">
                                    <input type="checkbox" {in name="voo->ps_id" value="$arr" }checked="checked" {/in}
                                    value="{$voo->ps_id}" name="role[]" id="user-Character-0-0">
                                    {$voo->ps_name}
                                </label>
                            </dt>
                            <dd>
                                {volist name='$permission_C' id='vooo'}
                                {eq name='voo->ps_id' value='$vooo->ps_pid'}
                                <label class="">
                                    <input type="checkbox" value="{$vooo->ps_id}" name="role[]"
                                           id="user-Character-0-0-0">
                                    {$vooo->ps_name}
                                </label>
                                {/eq}
                                {/volist}
                            </dd>
                        </dl>
                        {/eq}
                        {/volist}
                    </dd>
                </dl>
                {/volist}
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-success radius" id="admin-role-save" name="admin-role-save"><i
                        class="icon-ok"></i> 确定
                </button>
            </div>
        </div>
    </form>
</article>
<script>
    var SCOPE = {
        'url': "{:url('role/add',['id'=>$role->role_id])}"
    }
</script>
{include file="public/footer" /}
</body>
</html>